package jtk.project4.fleet.field;
/* 
 * Author               : Ezhar Ferbi Subyadi
 * Date Created         : 4-April-2011 
 * Date Modified        : 6-April-2011 
 * Version              : 1.1 
 * */ 


//import jtk.project4.fleet.domain.ScheduleRepair;
import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.MemoField;
import nl.coderight.jazz.form.field.TextField;

public class AddScheduledRepairField extends GroupControl{
	private ComboField<String> repairField;
	private ComboField<String> typeField;
	private MemoField commentsField;
	
public AddScheduledRepairField(String bindID){
		setTitle("header.AddScheduledRepairField");
		setBindID(bindID);
		createFields();
		createLayout();
    	
}
	
	private void createFields(){
		
		
		repairField = new ComboField<String>("repair", "repair");
		repairField.setRequired(true);
		repairField.setPreferredSize(new Dimension(300, 20));
		typeField = new ComboField<String>("repair", "type");
		typeField.setPreferredSize(new Dimension(300, 20));
		commentsField = new MemoField();
		commentsField.setRows(3);
		//commentsField.setRequired(true);
		
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addLabel("label.repair:").addField(repairField)
		.addRow()
		.addLabel("label.type:").addField(typeField)
		.addRow()
		.addLabel("label.comments:").addField(commentsField);
	
		
	}
}

